<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<%@ include file="/commons/nocache.jspf" %>
<%@ taglib uri="/FCKeditor" prefix="FCK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http：//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http：//www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/form.dwt" codeOutsideHTMLIsLocked="true" -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<script type="text/javascript" src="${ctx}/scripts/datepicker/wpCalendar.js"></script>
<!-- InstanceBeginEditable name="doctitle" -->
<title>通知管理</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="scripts" -->
<script type="text/javascript">
	function deleteIt(id, page) {
	  if(window.confirm('确定要删除吗?')) {
	  	window.location = "${ctx }/notice/notice!delete.action?notice.id="+id+"&flipPageInfo.page="+page;
	  }  
	}		
	function list(){
		document.pageform.submit();
	}
	function outExcel(){
		document.searchform.action="${ctx}/notice/notice!outExcel.action";
		document.searchform.submit();
	}
	function search(){
		document.searchform.action="${ctx}/notice/notice!search.action";
		document.searchform.submit();
	}
	function modifyIt(id){
		document.getElementById("id").value = id;
		document.modifyform.action="${ctx}/notice/notice!modifyPre.action";
		document.modifyform.submit();
	}
	function detailIt(id){
		document.getElementById("id").value = id;
		document.modifyform.action="${ctx}/notice/notice!detail.action";
		document.modifyform.submit();
	}
	function agreeIt(id){
	/**
		$.ajax({

			url 	 : '${ctx}/notice/notice!agree.action?notice.id='+id,
			dataType : 'json',
			success  : function(json){
					alert("支持成功");
			},
			error	 : function(){
			}
		});
		*/
		window.location = '${ctx}/notice/notice!agree.action?notice.id='+id;
	}
	function detailUnionUserName(name){
		alert(name);
	}
</script>
<!-- InstanceEndEditable -->
</head>

<body>

<div id="main">
	<div class="zdsz" id="select1">
		<div class="tab">

<!-- InstanceBeginEditable name="tab" -->
<a href="${ctx}/notice/notice!index.action"><h3>添加通知</h3></a>
<a href="${ctx}/notice/notice!search.action"><h3 class="sel">通知列表</h3></a>

<!-- InstanceEndEditable -->
		</div>
		<div class="zd_gut">
			<ul class="block">
				<li>
		
<!-- InstanceBeginEditable name="form" -->
<form action="${ctx}/notice/notice!search.action" method="post" name="searchform">
	<div class="zc_but2">	

         标题:
        <input name="s_theme" type="text" size="10" maxLength="50" value="${s_theme}"/>
       	内容:
       	<input name="s_content" type="text" size="10" maxLength="500" value="${s_content}"/>
        <input name="button"  type="button" onclick="search();" class="log_f zc_b" value="查询"/>
    </div>
</form>
<div id="ErrorName"  align="center"></div>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tab_1 center">
	<tr>
  	  <td class="bg4">标题</td>
	  <td class="bg4">内容</td>
	  <td class="bg4">日期</td>	
	  <td class="bg4">操   作</td>
	</tr>
	<s:iterator value="flipPageInfo.data" status="data" id="d">
		<tr>
			<td>${util:chop(theme,"20","...")}</td>	
			<td>${util:chop(content,"20","...")}</td>	
			<td><fmt:formatDate value="${date}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			<td>
				<a href="#" onclick="detailIt('${id }');">[查看]</a>
				<a href="#" onclick="modifyIt('${id }','${flipPageInfo.page }');">[修改]</a>
				<a href="#" onclick="deleteIt('${id }','${flipPageInfo.page }');">[删除]</a>
			</td>
		</tr>
	</s:iterator>
</table> 

<form action="${ctx}/notice/notice!search.action" method="post" name="pageform">
	<div class="fy01" align="center">
		<jsp:include page="/WEB-INF/page/common/page.jsp" />
	</div>
	<input type="hidden" name="flipPageInfo.page" id="page" value="${flipPageInfo.page}" />
	<input type="hidden" name="s_theme" value="${s_theme }"/>
	<input type="hidden" name="s_content" value="${s_content }"/>
</form>
<form action="${ctx}/notice/notice!modifyPre.action" method="post" name="modifyform">
	<input type="hidden" id="id" name="notice.id" value="${notice.id }"/>
	<input type="hidden" name="flipPageInfo.page" id="page" value="${flipPageInfo.page}" />
    <input type="hidden" name="s_theme" value="${s_theme }"/>
	<input type="hidden" name="s_content" value="${s_content }"/>
</form>
</li>
		</ul>
	  </div>
	</div>
</div>
</body>
<!-- InstanceEnd --></html>
